import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysRolePermissionService } from './sys_role_permission.service';
import { CreateSysRolePermissionDto } from './dto/create-sys_role_permission.dto';
import { UpdateSysRolePermissionDto } from './dto/update-sys_role_permission.dto';

@Controller('sys-role-permission')
export class SysRolePermissionController {
  constructor(private readonly sysRolePermissionService: SysRolePermissionService) {}

  @Post()
  create(@Body() createSysRolePermissionDto: CreateSysRolePermissionDto) {
    return this.sysRolePermissionService.create(createSysRolePermissionDto);
  }

  @Get()
  findAll() {
    return this.sysRolePermissionService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysRolePermissionService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysRolePermissionDto: UpdateSysRolePermissionDto) {
    return this.sysRolePermissionService.update(id, updateSysRolePermissionDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysRolePermissionService.remove(id);
  }
}
